package com.parking.common.core.util;


import com.parking.common.core.exception.ParkingException;
import com.parking.common.core.model.Result;

public class ResultUtil {
    public static void checkResult(Result result) throws Exception {
        if(result.getCode()==500) throw new Exception("系统异常");
        if(result.getCode()!=200) throw new ParkingException(result.getMessage(), result.getCode());
    }
}
